<!--# include("/cms/common/basic.html",{"basic":buyHouseSubsidies}){} -->

<fieldset class="layui-elem-field">
        <legend>申报信息</legend><!--# if(!has(look)){  --><input type="checkbox" class="validCheckBox" title="检查"><!--# } -->
        <div class="layui-field-box">
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">人才卡有效时间</label>
                        <div class="layui-input-inline">
                            <input type="hidden" name="cardStartDate" value="${buyHouseSubsidies.cardStartDate!'', 'yyyy-MM-dd'}">
                            <input type="hidden" name="cardEndDate" value="${buyHouseSubsidies.cardEndDate!'', 'yyyy-MM-dd'}">

                            <input type="text"  value="${buyHouseSubsidies.cardStartDate,"yyyy-MM-dd"}  至  ${buyHouseSubsidies.cardEndDate,"yyyy-MM-dd"}"   class="layui-input input-readonly" readonly="true">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">积分</label>
                        <div class="layui-input-inline">
                            <input type="text" id="score" value="${buyHouseSubsidies.cardScore!''}" readonly name="cardScore" class="layui-input input-readonly"
                                   lay-verify="required">
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">申报补贴年次</label>
                        <div class="layui-input-inline">
                            <layui:simpleDictSelect style='layui-input-inline' type="declareYear" readonly="true"
                                                    id="declareYear" name="declareYear"
                                                    value="${buyHouseSubsidies.declareYear}" layVerify="required"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">补贴金额</label>
                        <div class="layui-input-inline">
                            <input type="hidden"  name="declareMoney" value="${buyHouseSubsidies.declareMoney}">
                            <input type="text" id="declareMoney" value="${buyHouseSubsidies.declareMoney,numberFormat='###,###.00'}" readonly class="layui-input input-readonly" lay-verify="required">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">是否在金湾区首次购房</label>
                        <div class="layui-input-inline">
                            <layui:simpleDictSelect style='layui-input-inline' type="firstBuyHouse" readonly="true"
                                                    id="firstBuyHouse" name="firstBuyHouse"
                                                    value="${buyHouseSubsidies.firstBuyHouse}" layVerify="required"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">房产证时间</label>
                        <div class="layui-input-inline">
                            <input type="text"  name="advanceLandingTime" class="layui-input input-readonly" readonly="true" value="${buyHouseSubsidies.advanceLandingTime,"yyyy-MM-dd"}" >
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">特殊情况说明(最多100汉字)</label>
                        <div class="layui-input-inline">
                            <textarea id="specialInstructions" name="specialInstructions"   class="layui-textarea input-readonly" style="width: 740px">${buyHouseSubsidies.specialInstructions}</textarea>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>
<fieldset class="layui-elem-field">
    <legend>材料信息</legend>
    <span style="color: red;margin-left: 30px;font-size: 18px">支持文件格式为：pdf,jpg,png,gif，单个文件大小不超过20M。带*号标识的对应资料必须上传，其它资料不作要求。上传文件内容请确保真实清晰、有效，不能有旋转。上传后请查看预览，正确无误后再申报提交。</span>
    <!--# if(parseInt(buyHouseSubsidies.year) >= 2020){  -->
    <table class="layui-table" style="width: 660px;clear:both;margin:0px;">
        <thead>
        <tr>
            <th style="width: 300px;padding:4px 15px;">材料名称</th>
            <th style="width: 210px;padding:4px 15px;">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>房产证原件扫描件<span style="color: red">*</span></td>
            <td>
                <button type="button" onclick="Common.openPreview('${buyHouseSubsidies.roomType}','预览')" class="layui-btn layui-btn-mini layui-btn-sm">预览</button>
            </td>
        </tr>
        <tr>
            <td>其他材料</td>
            <td>
                <button type="button" onclick="Common.openPreview('${buyHouseSubsidies.fileIdCard}','预览')" class="layui-btn layui-btn-mini layui-btn-sm">预览</button>
            </td>
        </tr>
        </tbody>
    </table>
    <!--# } -->
    <!--#  if(parseInt(buyHouseSubsidies.year) < 2020){ -->
    <div class="layui-row">
        <label class="layui-form-label file-upload">房产证原件扫描件<span style="color: red">*</span></label>
        <layui:attachment name="roomType" batchFileUUID="${buyHouseSubsidies.roomType}" isNew="false" readonly="true" bizType="User"/>
    </div>
    <div class="layui-row">
        <label class="layui-form-label file-upload">其他材料</label>
        <layui:attachment name="fileIdCard" batchFileUUID="${buyHouseSubsidies.fileIdCard}" isNew="false" readonly="true" bizType="User"/>
    </div>
    <!--# } -->
</fieldset>
    <!-- 业务对象须有hidden字段，保存delFlag和version字段-->
    <input type="hidden" name="delFlag" value="${buyHouseSubsidies.delFlag}" />
    <input type="hidden" name="id" value="${buyHouseSubsidies.id}" />

    <input type="hidden" id="companyId" name="companyId" value="${buyHouseSubsidies.companyId}" class="layui-input">
    <input type="hidden" id="userId" name="userId" value="${buyHouseSubsidies.userId}" class="layui-input">
    <input type="hidden" id="year" name="year" value="${buyHouseSubsidies.year}" class="layui-input">
    <input type="hidden" id="organizationCode" name="organizationCode" value="${buyHouseSubsidies.organizationCode}"
           class="layui-input">
    <input type="hidden" id="businessState" name="businessState" value="${buyHouseSubsidies.businessState}"
           class="layui-input">
    <input type="hidden" id="businessStateCode" name="businessStateCode" value="${buyHouseSubsidies.businessStateCode}" class="layui-input">
    <input type="hidden" id="companyDeclareTime" name="companyDeclareTime"  value="${buyHouseSubsidies.companyDeclareTime,'yyyy-MM-dd HH:mm:ss'}" class="layui-input input-datetime" >

<script>
    /**
     * 高阶函数，传入函数调用
     * @param f
     * @returns {boolean}
     */
    function validAll(f){
        var allCheckBox = $(".validCheckBox");
        var result = true;
        allCheckBox.each(function(){
            var state = $(this).prop("checked");
            result = result & state;
            if(state == false){
                $(this).focus();
            }

        });

        if(result == true){
            f();
        }else{
            Common.info("必须勾选所有检查确认框");
        }

        return result;
    }
</script>
